Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(editor): Add optional chaining to error handler (no-changelog) #11500

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

alexgrozav
Copy link
Contributor

Summary

Sentry error

Related Linear tickets, Github issues, and Community forum posts

https://linear.app/n8n/issue/CAT-289/typeerror-cannot-read-properties-of-undefined-reading-data

Review / Merge checklist

  • PR title and summary are descriptive. (conventions)
  • Docs updated or follow-up ticket created.
  • Tests included.
  • PR Labeled with release/backport (if the PR is an urgent fix that needs to be backported)

@alexgrozav alexgrozav self-assigned this Nov 1, 2024
@@ -113,8 +113,8 @@ export async function request(config: {
});
}

const errorResponseData = error.response.data;
if (errorResponseData !== undefined && errorResponseData.message !== undefined) {
const errorResponseData = error.response?.data;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

would be nice to add a unit test

Copy link

cypress bot commented Nov 1, 2024

n8n    Run #7653

Run Properties:  status check passed Passed #7653  •  git commit ef9ab43704: 🌳 🖥️ browsers:node18.12.0-chrome107 🤖 alexgrozav 🗃️ e2e/*
Project n8n
Branch Review cat-289-typeerror-cannot-read-properties-of-undefined-reading-data
Run status status check passed Passed #7653
Run duration 04m 24s
Commit git commit ef9ab43704: 🌳 🖥️ browsers:node18.12.0-chrome107 🤖 alexgrozav 🗃️ e2e/*
Committer Alex Grozav
View all properties for this run ↗︎

Test results
Tests that failed  Failures 0
Tests that were flaky  Flaky 1
Tests that did not run due to a developer annotating a test with .skip  Pending 0
Tests that did not run due to a failure in a mocha hook  Skipped 0
Tests that passed  Passing 461
View all changes introduced in this branch ↗︎

Copy link
Contributor

github-actions bot commented Nov 1, 2024

✅ All Cypress E2E specs passed

@n8n-assistant n8n-assistant bot added n8n team Authored by the n8n team ui Enhancement in /editor-ui or /design-system labels Nov 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
n8n team Authored by the n8n team ui Enhancement in /editor-ui or /design-system
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants